Assisted query formation, validation, and result previewing in a database having a complex schema

ABSTRACT

Disclosed are a method, a device and/or a system of assisted query formation, validation, and result previewing in a database having a complex schema. In one aspect, a method of a query editor includes generating a data profile which includes a set of characteristics captured at various granularities of an initial result set generated from an initial query using a processor and a memory. The method determines what a user expects in the initial result set of the initial query and/or a subsequent result set of a subsequent query based on the data profile and/or a heuristically estimated data profile. The method includes enabling the user to evaluate a semantic accuracy of the subsequent query based on the likely expectation of the user as determined through the set of characteristics of the data profile. The set of characteristics may include metadata of the initial query.

CLAIM OF PRIORITY

This disclosure claims priority to, and incorporates herein by referencethe entire specification of U.S. Provisional Patent Application No.61/802,716 filed on Mar. 17, 2013 and titled DATA PROFILE DRIVEN QUERYBUILDER.

This disclosure claims priority to, and incorporates herein by referencethe entire specification of U.S. Provisional Patent Application No.61/802,742 filed on Mar. 18, 2013 and titled DEVELOPING A SOCIAL DATACATALOG BY CROWD-SOURCING.

This disclosure claims priority to, and incorporates herein by referencethe entire specification of U.S. Provisional Patent Application No.61/802,743 filed on Mar. 18, 2013 and titled CREATING A DATA CATALOG BYMINING QUERIES.

This disclosure claims priority to, and incorporates herein by referencethe entire specification of U.S. Provisional Patent Application No.61/802,744 filed on Mar. 18, 2013 and titled AUTO-COMPLETION OF QUERIESWITH DATA OBJECT NAMES AND DATA PROFILES.

FIELD OF TECHNOLOGY

This disclosure relates generally to computing technology and, moreparticularly, to a method and system of assisted query formation,validation, and result previewing in a database having a complex schema.

BACKGROUND

A database may be created and maintained by a wide variety of users inan organization (e.g., Target®, eBay®, Walmart®, etc.). Over time,different engineers may use their own semantics when defining elements,variables, and/or attributes of the database. This may create semanticcomplexity that may make it difficult for others to run queries againstthe database without extensive experimentation.

For example, an analyst may seek to perform queries against the databasebased on a business requirement such as whether an item is likely toarrive at a particular distribution center in sufficient quantity for anexpected holiday season based on forecasted supply and/or demand.However, the analyst may not know how to best execute his/her querieswithout a detailed understanding of the database schema, design, and/ortable structure. In addition, the database may be massive, and queriesto the database may take many minutes to execute. For this reason, itmay be cumbersome for the analyst to execute the query. As a result, theproductivity of engineers querying the database may be compromised.

SUMMARY

Disclosed are a method, a device and/or a system of assisted queryformation, validation, and result previewing in a database having acomplex schema.

In one aspect, a method of a query editor includes generating a dataprofile which includes a set of characteristics captured at variousgranularities of an initial result set generated from an initial queryusing a processor and a memory. The method determines what a userexpects in the initial result set of the initial query and/or asubsequent result set of a subsequent query based on the data profileand/or a heuristically estimated data profile. The method includesenabling the user to evaluate a semantic accuracy of the subsequentquery based on the likely expectation of the user as determined throughthe set of characteristics of the data profile.

The set of characteristics may include metadata of the initial query.For example, the set of characteristics may include a number ofattributes in the initial result set, a data type of each of theattributes, a frequency of usage per user, a uniqueness constraint onthe attributes, a nullability of individual attributes, and/or afunctional dependency between attributes. The method may determine amatch ratio between the subsequent query and the initial query. At leastsome of the set of characteristics of the data profile may be presentedto the user based on the match ratio through the query editor.

The set of characteristics may include individual row characteristics.The data profile may include a random sample of information presented inthe initial result set. The user may be able to perform a cursoryexamination of the presented ones of the set of characteristics and/orthe random sample of information presented in the initial result setand/or the subsequent result set (e.g., based on the match ratio betweenthe subsequent query and the initial query). The set of characteristicsmay include aggregate statistical characteristics including genericaggregate statistics and scenario aggregate statistics. The genericaggregate statistics may be calculated in a manner that is independentof a set of semantics of the attributes. The scenario aggregatestatistics may be defined through a domain expert. The scenarioaggregate statistics may be relevant in a particular scenario to enablethe incorporation of a domain-specific interpretation of semantics ofeach attribute and each set of data of the initial result set and/or thesubsequent result set.

The generic aggregate statistics may include number of rows of theinitial result set and/or the subsequent result set, a count of distinctvalues in each attribute, a distribution of attribute values includingfrequency per attribute value, a pattern of attribute values forattribute values and/or a set of functional dependencies among attributevalue pairs. The generic aggregate value statistics may be applicablewith no customization by the user. The scenario aggregate statistics maybe programmed via user-defined aggregate queries and may be associatedwith the initial result set and the subsequent result set.

The syntax of the user-defined aggregate queries may be specific to astandard query processing engine and the signature of the scenarioaggregate statistics may create the signature corresponds to a set oftable valued functions. The method may present the set ofcharacteristics of the data profile to the user through the query editorbased on an auto-complete algorithm to which the data profile and/or theinitial result set and/or the subsequent result will be predicted when apartial input of the initial query and/or the subsequent query isentered in the query editor.

The set of characteristics of the data profile may be presented to theuser of the query editor through a profile visualizer module. The modulemay generate a visual representation of the data profile in a searchableformat and/or a hierarchical format and/or a navigable format. Themethod may include computing the data profile through a result setprofiler module which may map each attribute value of the attribute tothe number of times particular value is observed in the attribute andmay map patterns exhibited by an attribute value to a count of timespattern is observed in the attribute.

The pattern may be constructed based on a regular expression ofstring-valued attributes. The method may permit the user to provide auser defined table value function using a visual interface through anapplication programming interface. The application program interface mayconsider a data source and/or a table and/or a table value aggregatequery data as an input to be registered with the result set profiler.The user may be permitted to mark the subsequent query as completedafter an iterative evaluation of the data profile generated fromprevious queries. The method may generate sample database having anidentical schema which includes a potentially biased random sample ofall the relations with a reduced set of data. The method may execute thesubsequent query through the use of sample database to enable the userto reduce the time in debugging the subsequent query.

The method may apply a reservoir sampling algorithm to ensure a constantsample size is maintained. Each row in the subsequent result set of anysubsequent query is selected with a same probability in a manner suchthat a tuple selected by many subsequent queries in a query log islikely to be selected in the potentially biased random sample with ahigher probability. The method may generate an aggregate value based onthe potentially biased random sample through a heuristical-estimationalgorithm. The method may monitor the behavior of the user ininteracting with the set of characteristics of the data profile when thesubsequent query is generated. Further, the method may refine anpresentation algorithm which may optimally determines thecharacteristics to present the user based in further query based on amonitored behavior of the user interacting with initial query and/or thesubsequent query in the query editor.

In another aspect, a query editor application includes a result setprofiler module to generate a data profile which includes a set ofcharacteristics captured at various granularities of an initial resultset generated from an initial query using a processor and a memory. Thequery editor application also includes a heuristical-estimation moduleto determine what a user expects the initial result set of the initialquery and/or in a subsequent result set of a subsequent query based onthe data profile and/or a heuristically estimated data profile.Furthermore, the query editor application includes a profile visualizermodule to enable the user to evaluate a semantic accuracy of thesubsequent query based on the likely expectation of the user asdetermined through the set of characteristics of the data profile.

In yet another aspect, a non-transitory medium, readable through aprocessor and a memory, which includes instructions embodied that areexecutable through the processor and the memory includes theinstructions to determine what a user expects in one of an initialresult set of an initial query and/or a subsequent result set of asubsequent query based on a data profile and/or a heuristicallyestimated data profile. The non-transitory medium includes theinstructions to enable the user to evaluate a semantic accuracy of thesubsequent query based on the likely expectation of the user asdetermined through a set of characteristics of the data profile. Themethod further includes instructions to present some set ofcharacteristics of the data profile to the user based on the match ratiothrough the query editor.

The methods and systems disclosed herein may be implemented in any meansfor achieving various aspects, and may be executed in a form of anon-transitory machine-readable medium embodying a set of instructionsthat, when executed by a machine, cause the machine to perform any ofthe operations disclosed herein. Other features will be apparent fromthe accompanying drawings and from the detailed description thatfollows.

BRIEF DESCRIPTION OF THE DRAWINGS

The embodiments of this invention are illustrated by way of example andnot limitation in the figures of the accompanying drawings, in whichlike references indicate similar elements and in which:

FIG. 1 is a block diagram showing the process view of a system forassisted query formation, validation, and result previewing, accordingto one embodiment.

FIG. 2 is a block diagram of the query editor, according to oneembodiment.

FIG. 3 is a representation of the visual interface view, according toone embodiment.

FIG. 4 is an architectural view of a system for assisted queryformation, validation, and result previewing, according to oneembodiment.

FIG. 5 is an iterative query view 580 operational flow of a useriteratively refining a query with aggregation (e.g. SUM, COUNT, AVERAGE)using the profile estimator, query executor result set profiler 202, andthe profile configurator, according to one embodiment.

FIG. 6 shows the data profile visualizer view, according to oneembodiment.

FIG. 7 shows the estimator view of the database sampler, according toone embodiment.

FIG. 8 provides a block diagram of the curated answers system 850, inone embodiment.

FIG. 9 provides a block diagram of the profile markup page 806corresponding to a user 110, in one embodiment.

FIG. 10 provides a block diagram to the data catalog studio module 1000,in one embodiment.

FIG. 11 provides a block diagram of the social data catalog studio 1150,in one embodiment.

FIG. 12 presents an interaction view 1250 of the social data catalogtable 1016 as displayed to the user 110 whose purpose is to storerelationships between data objects 1202 and people 1204, in oneembodiment.

FIG. 13 is a block diagram of logical information extraction fromdocumentation view 1350, in one embodiment.

FIG. 14 is a block diagram of data-people graph extractor from querylogs view 1450, in one embodiment.

FIG. 15 is a block diagram of the data source metadata extractor view1550, in one embodiment.

FIG. 16 is a block diagram of the expert identifier view 1650, in oneembodiment.

FIG. 17 is a block diagram of the social data catalog studio view 1750,in one embodiment.

FIG. 18 presents the social data catalog view 1850, in one embodiment.

FIG. 19 presents block diagrams of the query log miner view 1950 and thequery logs crawler 1912, in one embodiment.

FIG. 20 presents the related objects API view 2050, in one embodiment.

FIG. 21 is a block diagram of the architectural view 2150, in oneembodiment.

FIG. 22 provides a block diagram of the collaborative databasemanagement system, in one embodiment.

FIG. 23 is a block diagram of the network view 2350, in one embodiment.

FIG. 24 presents the data catalog view 2450, in one embodiment.

FIG. 25 is a block diagram of the index view 2550 of the query languagekeywords prefix index 2500 and the data catalog prefix index 2502, inone embodiment.

FIG. 26 contains the flow view 2650 of the test query builder 2610, inone embodiment.

Other features of the present embodiments will be apparent from theaccompanying drawings and from the detailed description that follows.

DETAILED DESCRIPTION

Disclosed are a method, a device and/or a system of assisted queryformation, validation, and result previewing in a database having acomplex schema.

FIG. 1 is a block diagram showing the process view 150 of a system forassisted query formation, validation, and result previewing, accordingto one embodiment. FIG. 1 shows a query editor 100, an original database102, a sample database 104, an initial result set 112, a data profile116, a collection of subsequent result sets a data processing system130.

According to one embodiment, a query editor 100 is software running on adata processing system 130 such as a desktop computer, a laptopcomputer, and/or a remote computational server. The processing system130 utilizes a processor 132 to execute software instructions stored inmemory 134, according to one embodiment. The processor 132 stores stateinformation associated with these executed instructions within both theprocessor 132 and the memory 134 of the data processing system,according to one embodiment. According to one embodiment, the processor132 may be a central processing unit (CPU), a microprocessor, and/or anyother hardware within a computer system that carries out theinstructions of a program by performing the basic arithmetical, logical,and input/output operations of the system. According to one embodiment,a memory 134 may be a random access memory (RAM), a read only memory(ROM), a flash memory, and/or any other physical devices used to storeprograms and/or data for use in a digital electronic device.

User 110 desires to construct a query that retrieves information fromthe original database that satisfies some informational need, accordingto one embodiment. User 110 interacts with the query editor 100 toproduce an initial query 106 and zero and/or more one of the subsequentquery 108 through a process of iterative refinement, according to oneembodiment. An initial query 106 and any subsequent query 108 aresyntactic representations of retrieval operations to be performed uponinformation stored in the original database 102 and/or the sampledatabase 104, according to one embodiment. This syntactic representationmay take the form of Structured Query Language and/or any otherinformation retrieval language required by original database 102 and/orthe sample database 104, according to one embodiment. The query editor100 submits the initial query 106 and any subsequent query 108 to thesample database 104 on behalf of user 110 to generate the initial resultset 112 and any subsequent result set 114, according to one embodiment.

The sample database 104 contains a biased random subset of the contentwithin the original database 102, according to one embodiment. Thesample database 104 and the original database 102 exhibit the samestructural schema, tables and views with the same number of columns andidentical column names and column definitions (e.g. data types andconstraints), according to one embodiment. The sample database 104 willserve as a proxy data source with the purpose of reducing query latencyduring iterative refinement of initial query 106 into various subsequentqueries, according to one embodiment. The storage units (e.g. tables) inthe sample database 104 may store less data than those in the originaldatabase, but maybe identical for performance reasons, according to oneembodiment.

The data profile 116 captures all the interesting characteristics of aninitial result set 112 and/or subsequent result set 114, according toone embodiment. The data profile 116 includes of metadata 118,individual row characteristics 120, aggregate statisticalcharacteristics 122, according to one embodiment. Aggregate statisticalcharacteristics 122 may comprise generic aggregate statistics 124 andscenario aggregate statistics 126, according to one embodiment. Metadata118 includes, but is not limited to, the number of attributes in theresult set, the data types of each attribute, the uniqueness constraintson certain attributes and/or attribute sets, nullability of individualattributes, and functional dependencies across attributes and/or sets ofattributes, according to one embodiment. The data profile 116 may bestored as a structured text file using the INI format, extensible markuplanguage (XML), JSON, YAML, and/or other configuration file format,and/or within some data storage system such as a relational database(e.g. MySql®, Oracle®, and/or SQLite®), key-value and/or document-stores(e.g. Cassandra®, CouchDB®, and/or MongoDB®), and/or a persistent datastructure such as a Java® HashMap serialized to a file, according to oneembodiment.

Individual row characteristics 120 are a random sample of an initialresult set 112 and/or a subsequent result set 114 and are used by theuser to evaluate whether and/or not there are obvious patterns and/oranomalies, according to one embodiment.

Generic aggregate statistics 124 are used to validate the semanticaccuracy of an initial query 106 and/or subsequent query 108, accordingto one embodiment. Generic aggregate statistics 124 may include initialresult set 112 and subsequent result set 114 statistics unrelated to thesemantics of the result set attributes, according to one embodiment.These statistics include, but are not limited to, number of rows, numberof distinct values in each attribute, frequency distributions ofattribute values, patterns of attribute values (such as distribution bynumber of digits for integer values, the joint distribution of digits tothe right and left of the decimal point for floating point values,and/or a set of regular expressions for string values), and functionalrelationships among attribute value pairs, according to one embodiment.Generic aggregate statistics 124 may have configuration parameters suchas number of bins and bin widths for frequency distributions and/orpattern lists, but generally are predefined without any customization bythe user 110, according to one embodiment. Computation of genericaggregate statistics 124 can be optimized and will often be computedwith one and/or a few scans of the data, according to one embodiment.

Scenario aggregate statistics 126 capture statistics related to thesemantics of the result set attributes, according to one embodiment.These statistics are defined by user 110 during the refinement processto capture scenario specific expectations of desired query behavior,according to one embodiment. Scenario aggregate statistics 126 aredefined using the syntax specific to query processing engines oforiginal database 102 and sample database 104 and operate on an initialresult set 112 and/or subsequent result set 114, according to oneembodiment.

FIG. 2 is a block diagram of the query editor 100, according to oneembodiment. The query editor allows the use 110 to write queries,validate queries, and execute queries, as well as configure theenvironment in which these processes operate, according to oneembodiment. The initial query 106 and/or a subsequent query 108 is builtwithin the query editor 100. The query editor 100 may include anauto-complete algorithm module 200, a result set profiler module 202,profile visualizer module 204, a sample database generator module 206, acompletion marker module 208, a sampling module 218, and an estimationmodule 216.

The result set profiler module 202 takes an initial result set 112and/or subsequent result set 114 and computes the data profile 116,according to one embodiment. It scans each row the result set andmaintains several key-value mappings that map a pattern to the frequencyof attribute values that match the pattern, according to one embodiment.These mapping include, but are not limited to, item frequency (thepattern is the value), numeric representation patterns such as thenumber of digits for integers and the number of digits before and afterthe decimal point for floating point number, string patterns defined byregular expressions, and/or scenario specific pattern sets such asexpected functional relationships, according to one embodiment.

The sampling module 218 employs a reservoir sampling algorithm 210,according to one embodiment. The reservoir sampling algorithm 210examines queries from query logs 700 and fills the sample database 104with randomly select rows that satisfy the conditional clause (e.g.WHERE for Structured Query Language), according to one embodiment. If nosuch conditional clauses are found, then the reservoir samplingalgorithm 210 will sample uniformly from all rows, according to oneembodiment. Reservoir sampling techniques, and/or other techniques forsampling a fixed number of items from a set of items, will ensure thatthe size of the tables in the sample database 104 will remain constant,with new rows displacing old rows within the sample database 104,according to one embodiment. This method may introduce duplicate rowsinto the sample database 104, according to one embodiment. The reservoirsampling algorithm may augment each row with a frequency count insteadstoring duplicates rows directly, according to one embodiment. Fordatabases with star schema, the sampling module 218 may only sample themain fact table while retaining copies of the dimension tables,especially if the dimension tables are relatively small, according toone embodiment.

The estimation module 216 contains a heuristical estimation algorithm212, according to one embodiment. The heuristical estimation algorithm212 estimates the results of aggregate value queries against theoriginal database 102 based upon the results of queries against thesample database 104, according to one embodiment. The sampling biasintroduced by the sampling module 218 may be used by the heuristicalestimation algorithm 212, according to one embodiment. Assumptions ofindependence can help extrapolate the aggregate values from the sampledatabase 104 (e.g., a smaller database), according to one embodiment.Bootstrapped estimation techniques, such as, but not limited to, caseresampling, Bayesian bootstrap, and/or parametric bootstrap, could alsobe employed to obtain more accurate results, according to oneembodiment. The estimation module 216 may also forgo applying theheuristical estimation algorithm and report to the user 110 that theaggregate values from the sample database 104 are based upon randomsamples and are likely to differ from aggregate values from the originaldatabase 102, according to one embodiment.

In one embodiment, a presentation algorithm 214 that optimallydetermines which characteristics to present to the user 110 may berefined based in a further query based on a monitored behavior of theuser in interacting with at least one of the initial query and thesubsequent query in the query editor.

The completion marker module 208 records the decision of the user 110that either the initial query 106 and/or some subsequent query 108 isready to run against the original database given the current dataprofile 116, according to one embodiment. The completion mark can bestored in the metadata 118 of the data profile 116 and/or separately insome form of persistent storage, according to one embodiment.

The sample database generator module 206 constructs and/or modifies asample database 104, according to one embodiment. The sample database104 is used by the auto-complete algorithm module 200, the result setprofiler module 202, the profile visualizer module 204, the sampledatabase generator module 206, the completion marker module 208, thesampling module 218, and the estimation module 216, according to oneembodiment. The sample database generator module 206 constructs and/ormodifies the sample database 104 by either using the sampling module 218to acquire data from the original database 102 and/or by directlycopying data from the original database 102 in the case of small datastorage units (e.g. tables), according to one embodiment.

The auto-complete algorithm module 200 provides change candidatesthrough the user interface of the query editor 100 to the user 110applicable to the initial query 106 and/or subsequent query 108 usingsample database 104 information from the sample database generatormodule 206 and data profile 116 information from the result set profilermodule 202, according to one embodiment. The auto-complete algorithmmodule 200 provides change candidates sorted by relevance to completethe current portion (e.g. attribute, table, or schema names, querykeywords, predicates, expressions) of the initial query 106 and/orsubsequent query 108, according to one embodiment. The incompleteportion of the initial query 106 and/or subsequent query 108 mayinclude, but not limited to, prefixes of physical names of data objects,or prefixes of logical names of data objects. Data objects include, butare not limited to, attributes, tables, schema, predicates, expressions,attribute values. In one embodiment, the auto-complete module 200 relieson a compressed index structure (e.g., a compressed trie) to work wellwithin memory restrictions of modern browers to provide a highlyresponsive behavior. The auto-complete module 200 may also beimplemented on the server side without concerns about memoryrestrictions.

FIG. 3 is a representation of the visual interface view 350, accordingto one embodiment. The user 110 may experience this view on the dataprocessing system 130 through a local application window, a command lineinterface, and/or a web browser, according to one embodiment. The visualinterface view 350 presents the user 110 with the current data profile116 consisting of metadata 118, row characteristics 120, genericaggregate statistics 124, and scenario aggregate statistics 126,according to one embodiment. The interface view 350 also presents thesubsequent query 108, according to one embodiment. The auto-completealgorithm module 200 monitors changes in the subsequent query 108 andoffers possible changes to the query, according to one embodiment.

FIG. 4 is an architectural view 450 of a system for assisted queryformation, validation, and result previewing, according to oneembodiment. The query editor 100 allows the user 110 the choice ofseveral activities including, but not limited to, configure profile 400,profile 402, test query 404, and/or run query 406, according to oneembodiment. When the user 110 configures the profile, the query editor100 instantiates, and/or communicates with, a profile configurator 408that will make user 110 directed changes to a configuration 414,according to one embodiment. The profile configurator 408 allows theuser 110 to change settings that affects the construction of the dataprofile 116 such as queries for scenario aggregate statistics 126,according to one embodiment. The configuration 414 may be stored as astructured text file using the INI format, extensible markup language(XML), JSON, YAML, and/or other configuration file format, and/or withinsome data storage system such as a relational database (e.g. MySql®,Oracle®, and/or SQLite®), key-value and/or document-stores (e.g.Cassandra®, CouchDB®, and/or MongoDB®), and/or a persistent datastructure such as a Java® HashMap serialized to a file, according to oneembodiment.

The sampling module 218 utilizes query logs 412 to seed the sampledatabase 104 with representative data randomly sampled from originaldatabase 102, according to one embodiment.

The estimation module 216 retrieves parameters from the configuration414 to facilitate the estimation of generic aggregate statistics 124 andscenario aggregate statistics 126 of the original database 102 basedupon the initial result set 112 and/or subsequent result sets 114collected from the sample database 104, according to one embodiment.

The run query 406 activity initiates the query executor 416 to send theinitial query 106 and/or subsequent query 108 to the original database102. Results from this query are collected and presented to the user 110through the user interface of the query editor 100, according to oneembodiment.

The top half of FIG. 5 shows the operational flow of a user 110iteratively refining a query without aggregation (e.g. SUM, COUNT,AVERAGE) using the query editor 100, result set profiler module 202, andthe profile configurator 408, according to one embodiment. User 110first configures the system through the profile configurator 408,informing the system of expectations and limitations of the targetquery, according to one embodiment. The user 110 provides an initialquery 106A to the query to the query editor 100. Query 108A may and/ormay not be complete as the auto-complete algorithm module may havesuggested changes, according to one embodiment. Once the user 110 issatisfied with the query 108A, the query 108A is sent to the result setprofiler, according to one embodiment. The user 110 examines the dataprofile 116 for the query 108A, after which the user 110 will eitherfinish because the query data profile indicates successful query, and/orthe user 110 will alter query 108A into query 108N and repeat the loop550, according to one embodiment. The bottom half of FIG. 5 shows theoperational flow of a user 110 iteratively refining a query withaggregation (e.g. SUM, COUNT, AVERAGE) using the profile estimator,query executor 416 result set profiler module 202, and the profileconfigurator 408, according to one embodiment. User 110 first configuresthe system through the profile configurator 408, informing the system ofexpectations and limitations of the target query, according to oneembodiment. The user 110 will start with a query 109A and send it to thequery editor 100 (e.g., a profile estimator) which responds with anestimated data profile 116, according to one embodiment. The user 110will repeatedly construct a modified query 109N while the estimated dataprofile 116 returned by the profile estimator is not satisfactory to theuser 110 (loop 560), according to one embodiment. At which point theuser 110 sends the query to the query executor 416 which produces a dataprofile 116, according to one embodiment. If this data profile 116 issatisfactory, the user 110 is finished, otherwise the process isrepeated as indicated by loop 570, according to one embodiment.

FIG. 6 shows the data profile visualizer view 650, according to oneembodiment. The user 110 may experience this view on the data processingsystem 130 through a local application window, a command line interface,and/or a web browser, according to one embodiment. The result setprofiler module 202 takes a results set 600 and extracts metadata 118,individual row characteristics 120, and aggregate statisticalcharacteristics 122 from the result set 112 (or 114) and places thisinformation in the data profile 116, according to one embodiment. Thedata profile visualizer view presents the contents of the profile to theuser 110, according to one embodiment. The data profile visualizer view650 displays number of result rows 602, attribute types 604, number ofdistinct attributes for each value 606, an attribute value histogram 608illustrating the distribution of values for each attribute, and valuepatterns 610 showing the distribution of string values represented byregular expressions, as well as custom aggregates 612, according to oneembodiment.

Individual row characteristics 120 are presented to the user 110 tovalidate the semantic correctness of the initial query 106 and/or anysubsequent query 108 and consist of a randomly chosen subset of theinitial result set 112 and/or subsequent result set 114, according toone embodiment.

FIG. 7 shows the estimator view 750 of the data profile visualizer view650, according to one embodiment. A query logs iterator 702 readsdatabase query logs 700, sending relevant query information to the queryprojector to base tables 704, according to one embodiment. The queryprojector to base tables 704 collects conditions associated with each ofthe base tables, consolidates, and then passes the conditions on to thebase table query sampler 706, according to one embodiment. The basetable query sampler 706 uses these conditions to drive a reservoirsampling algorithm 210 to fill table samples 708 in the sample database104, if storage units are large, otherwise it may copy the storage unitentirely, according to one embodiment.

FIG. 8 provides a block diagram of the curated answers system 850. Inone embodiment, a user 110 creates an initial query 802 against adatabase 803, which can be the original database 102 and/or the sampledatabase 104. The information 804 from this initial query 106 is storedin the profile markup page 806, in one embodiment. Another user 810creates a similar query 808 against a database 803, which can be theoriginal database 102 and/or the sample database 104. The semanticsimilarity module 814 compares the initial query 802 and the similarquery 808 and then annotates the profile markup page 806 of the initialquery 102, in one embodiment. The semantic similarity module 814determines the similarity of queries from the semantic similarity ofquery constituents including, but not limited to, tables, attributes,and predicates, found by exact and/or inexact match, in one embodiment.The information 804 collected from the similar query 808 is stored inanother profile markup page 812, in one embodiment.

FIG. 9 provides a block diagram of the profile markup page 806corresponding to a user 110. The profile markup page 806 comprises of apersonal photograph 906 of the user 110, user group(s) 908 the user 110belongs to, the electronic mailing addresses 910 of the user 110, thephone number 912 of the user 110, a biography 914 of the user, socialmedia handles 916 of the user 110 (e.g. Facebook®, Linkedin®, andStackOverflow®), and educational background 918 of the user 110, aquestion 900, zero or more responses 902, and automatically populatedinformation 904, in one embodiment. The question 900 contains annotationindicating another user 910 who asked the question 900, in oneembodiment. Each response 902 contains annotation indicating a user 110responded to the question 900, in one embodiment.

Automatically populated information 904 includes, but is not limited to,popular tables, popular attributes, co-queried attributes in a table,related tables, joinable columns, join predicates, and relevant filtersfor each table, in one embodiment.

FIG. 10 provides a block diagram to the data catalog studio module 1000,in one embodiment. Different users 1010 contribute to a set of profiles1014 stored in a social data catalog table 1016, in one embodiment. Asocial data catalog table 1016 contains metadata 118, usage informationof data sources 1012, and automatically populated information 904, inone embodiment. The metadata 118 consists of schema names, tables withinschemas, name and datatype of attributes, primary keys constraints (e.g.uniqueness and nullability), functional dependencies (e.g. the revenuecolumn is the product of the quantity and price columns), indexes, andforeign keys, in one embodiment. Another user 810 may view the set ofprofiles 1014, in one embodiment. The data catalog studio module 1000consists of a front end component 1011, the data catalog repository 1004and data source registrar 1006, the background extraction module 1002,and user interaction logger 1008, in one embodiment. The front endcomponent 1011 provides access to the data catalog repository 1004 anddata source registrar 1006, in one embodiment. The data catalog studiomodule 1000 stores and retrieves information from a data source 1012, inone embodiment.

A data catalog repository 1004 stores the social data catalog, dataobjects and/or information about the data object, and returnsinformation about the social data catalog and/or data objects, in oneembodiment. The data catalog repository 1004 may also update the socialdata catalog, data objects, and/or information about data objects, inone embodiment. The background extraction module 1002 automaticallyprofiles, locates, extracts and/or associates documentation and/or querylogs of the user 110 and/or other users 810, in one embodiment. The userinteraction logger 1008 monitors and/or records the activity of the user110 while interacting with the front end component 1011, in oneembodiment.

FIG. 11 provides a block diagram of the social data catalog studio 1150,in one embodiment. The front end component 1011 provides the user 110 aninterface for performing several action including, but not limited to,register data source, add documentation, add query logs, search, browse,update, and identify expert, in one embodiment. The front end component1011 translates user requests into social data catalog API 1102 requestsas necessary, in one embodiment. The social data catalog API 1102 alsoreceives requests from the data source metadata extractor 1106,data-people graph extractor from query logs 1108, and logical attributeextraction from documentation 1110, in one embodiment. The social datacatalog API 1102 passes these requests to the social data catalog module1100, in one embodiment. The front end component 1011 also sendsrequests and receives responses from the expert identifier module 1104,in one embodiment.

FIG. 12 presents an interaction view 1250 of the social data catalogtable 1016 as displayed to the user 110 whose purpose is to storerelationships between data objects 1202 and people 1204, in oneembodiment. The social data catalog table 1016 contains informationregarding many data sources 1012, such a relational database, a documentstore, or key-value store, in one embodiment. A data source 1012A willshow related people 1206 who are experts regarding the data source1012A, in one embodiment. A data source 1012A may have several schemas,tables, and attributes, each of which will show related people, logicalname, logical description, and type, in one embodiment. This structurewill be presented for data source 2 1012B, as well as others, in oneembodiment.

FIG. 13 is a block diagram of logical information extraction fromdocumentation view 1350, in one embodiment. The extraction process beginwith documents 1302, of arbitrary formats (e.g. Microsoft Word®, PDF®,and/or HTML), in one embodiment. All documents 1302 pass through aconvert to text 1304 process, in one embodiment. The resulting textdocuments pass to a portable information fragment segmenter 1306, in oneembodiment. A template detector 1308 identifies useful informationcomponents within a segment and the extractor of logical information1310 packages combines these components into composite facts, persegment 1314, in one embodiment. The template detector 1308 employsphysical metadata (e.g. the set of attributes within a table) toconstruct templates that identify locations within documents 1302 whereattributes are described, in one embodiment. The locations of thedescriptions along with analysis to determine patterns of the html tagor DOM structure between identified locations enables it to accuratelyextract logical title and description from unstructured documentation,in one embodiment. The composite facts are sent to the social datacatalog updater 1312 to be associated with the appropriate data objects1202, in one embodiment.

FIG. 14 is a block diagram of data-people graph extractor from querylogs view 1450, in one embodiment. Query logs 1400 containing tuples ofthe form <person, query> are passed to a query parser 1402, in oneembodiment. The query parser 1402 translates a <person, query> tupleinto a <person, <table, attributes, schema, predicates, derivedexpressions>> 1403 tuple, in one embodiment. The person-data objectexpander 1404 uses the <table, attributes, schema, predicates, derivedexpressions> 1403 to construct a set of <person, data object> 1405tuples that are sent to the data catalog updater 1416, in oneembodiment.

FIG. 15 is a block diagram of the data source metadata extractor view1550, in one embodiment. The metadata extractor 1502 pulls schema,tables, attributes, keys, foreign keys, indexes and any other relevantinformation from the data source 1012 through the data source API 1503,in one embodiment. The extracted information is then sent to the socialdata catalog updater 1504, in one embodiment.

FIG. 16 is a block diagram of the expert identifier view 1650, in oneembodiment. The front end component 1011 allows the user 110 to get somenumber, k, experts on an object and send email to those experts, in oneembodiment. The related people fetcher 1606 takes an object name 1604and produces a list of candidate experts by accessing the social datacatalog API 1102, in one embodiment. The person relevance scorer &ranker 1608 orders the candidate experts by relevance to the object name1604, in one embodiment. Features used by the person relevance scorer &ranker 1608 include, but are not limited to, authors of documentationabout a data source, people who registered a given data source, userswho have queried a data object, previous responses on requests forsimilar data objects, in one embodiment. The top-k filter 1610 keeps thetop k of the ranked expert candidates and sends them back to the frontend component 1011, in one embodiment.

FIG. 17 is a block diagram of the social data catalog studio view 1750,in one embodiment. The front end component 1011 allows the user 110several actions including register data source, add query logs, getrelated data/people, search, browse, and update, in one embodiment. Allthese actions are converted into social data catalog API 1102 calls, inone embodiment. The social data catalog API 1102 retrieves informationfrom the social data catalog table 1016, in one embodiment. The searchoperation matches keywords from titles, descriptions, physical names andvalues of the data object, in one embodiment.

The query logs crawler 1704 collects several types of logs including,but not limited to, application logs 1708, query editor logs 1710, andlogs 1706, in one embodiment. These query logs are passed on to thequery logs miner 1705 that updates the social data catalog table 1016through the social data catalog API 1102, in one embodiment.

FIG. 18 presents the social data catalog view 1850, in one embodiment.The social data catalog table 1016 records the many-to-many mappingbetween data objects 1202 and people 1204 in one embodiment. A datasource 1812A will show related people who are experts regarding the datasource 1812A and related data sources 1012 and/or objects outside ofthis data source, in one embodiment. A data source 1812A may haveseveral schemas, tables, predicates (both filter and join), userqueries, and attributes, each of which will show related people, relateddata objects, logical name, logical description, and type, in oneembodiment, in one embodiment. This structure will be presented for datasource 2 1812B and other data sources, in one embodiment.

FIG. 19 presents block diagrams of the query log miner view 1950 and thequery logs crawler 1912, in one embodiment. The query parser 1902processes query logs 1400 and extracts schema, table, and attributeinformation, in one embodiment. The data object normalizer (normalizernames & expressions) 1904 takes schema, table, and attribute identifiersand normalizes them into a consistent naming convention, such as usingfully qualified attribute names (e.g schema.table.attr_name) and storesthe normalized object references into a query reference table 1906, inone embodiment. An object co-occurrence aggregator 1908 passes over thequery reference table 1906 to construct an object graph 1910, in oneembodiment. The object graph is passed to the social data catalogupdater 1504 for storage, in one embodiment.

The query logs crawler 1912 constructs query logs 1400 by scanningapplication logs 1914 with the query extractor 1918, in one embodiment.The query extractor 1918 performs this scanning process using templates1916 produced by the template search and detector 1920 by analyzingexamples 1922 of application log fragments and query signatures (e.g“SELECT . . . ”), in one embodiment.

FIG. 20 presents the related objects API view 2050, in one embodiment.Object conditions 2000 are presented to the related objects fetcher 2002and it generates a set of candidate objects drawn from the social datacatalog module 1100 through the social data catalog API 1102, in oneembodiment. The candidate objects are rank ordered by the objects/personscoring & ranker 2004 and a top-k filter 2006 extracts the top k scoringobjects to produce related objects 2010 for the object conditions 2000,in one embodiment.

FIG. 21 is a block diagram of the architectural view 2150, in oneembodiment. A user 110 employs the query editor system 2012 running asan application or a web application inside a browser on a local dataprocessing system 130 with its own processor 132 and memory 134. Thequery system 2102 can query the original database 102 to produce a queryresponse 2112 and/or can initiate catalog calls/responses 2114 to theserver 2106. Another user 810, using a local, but different, dataprocessing system 130 with its own processor 132 and memory 134, mayemploy the query system 2104 to query the original database 102 toproduce a query response and/or can initiate catalog calls/responses2114 to the server 2106. A special admin user 2110 may employ the adminconsole 2107 to initiate ops and security management 2116 calls andresponses. The server 2106 runs on a cluster of data processing systems130 with its own processor 132 and memory 134, which may be local to orremotely from the query system 2102, the query system 2102, and/or theadmin console 2107, in one embodiment. In one embodiment, the server2106 operates as a web service (may be constructed with Django®, Ruby onRails®, and/or some other web service framework) on aclustered/distributed computing system (e.g. uWSGI) that accesses thesocial data catalog table 1016 on a database. The server 2106communicates with the original database and/or the sample database 104through operations 2111 including, but not limited to, metadataextraction, query profiling, in one embodiment.

The server 2106 performs several learning 2108 operations including, butnot limited to, expertise mining, template mining, query log mining,auto generation of templates, statistics computation, search rankingmodel, recommendation model, query preference optimization, similar dataobjects (e.g. attributes, tables), in one embodiment.

FIG. 22 provides a block diagram of the collaborative databasemanagement system 2250, in one embodiment. A user 110 creates an initialquery 802 against a database 803, which can be either the originaldatabase 102 and/or the sample database 104, in one embodiment. Theinformation 804 from this initial query 106 and the editable markup page2200 is stored in the profile markup page 806, in one embodiment. Theeditable markup page 2200 is identified by a page name 2202, in oneembodiment. Another user 810 creates a similar query 808 against adatabase 803, which can be the original database 102 and/or the sampledatabase 104, in one embodiment. The semantic similarity module 814compares the initial query 802 and the similar query 808 and thenannotates the profile markup page 806 of the initial query, in oneembodiment. The information 804 collected from the similar query 808 isstored in another profile markup page 812, in one embodiment.

FIG. 23 is a block diagram of the network view 2350, in one embodiment.The client 2300 contains a query builder/editor 2302 that interacts withthe query language prefix index 2304, the data catalog prefix index2306, the query modifier for testing 2308, and performs query execution2310, in one embodiment.

The query language prefix index 2304 and the data catalog prefix index2306 are built and updated by the server 2316 providing the data catalogAPI 2318, in one embodiment. The server 2316 stores query languagekeywords 2312 and a data catalog 2314, in one embodiment.

The client 2300 also interacts with the query processing engine 2320 forthe database 803, in one embodiment.

FIG. 24 presents the data catalog view 2450, in one embodiment. The datacatalog 2402 includes, but not limited to, information concerning datasources, schemas, tables, attributes, predicates (both filter and join),derived expressions, and user queries, in one embodiment.

FIG. 25 is a block diagram of the index view 2550 of the query languagekeywords prefix index 2500 and the data catalog prefix index 2502, inone embodiment.

A query language keywords prefix index 2500 consists of a prefix index2504, stored as a trie, hash map, and/or other indexed data structures,and a precedence graph between keywords 2506, in one embodiment. Thequery language keywords prefix index 2500 supports several operationsincluding, but not limited to, lookup (prefix, previous keywords) 2524,candidate keywords 2522, build keyword dictionary 2512, and buildprecedence graph 2510, in one embodiment.

The data catalog prefix index 2502 consists of an indexable datastructure 2508, such as a trie and/or hash map, implementing a prefixindex key to <data object name, properties> tuple, in one embodiment.The data object name could be the physical name and/or the logical nameof the object. The data catalog prefix indexes 2502 supports severaloperations including, but not limited to, lookup (prefix) 2520,candidate 2518, build (data set) 2514, and update (data object nameproperties) in one embodiment.

FIG. 26 contains the flow view 2650 of the test query builder 2610, inone embodiment. In flow chart 2608, a base table identifier 2600 isprovided, if the language supports sampling 2602, then the test querybuilder 2610 performs the table sample replacer 2606 action, otherwise,the test query builder 2610 performs the table name to table limitreplacer 2604 action, in one embodiment.

A typical user 110 use case is described in the interaction diagram 2620of FIG. 26, in one embodiment. A user 110 initializes the session bysending initialization information to the social data catalog API 1102,which forwards this initialization information to the test query builder2610, in one embodiment. The test query builder 2610 then builds prefixindexes such as query language keywords prefix index 2500 and/or datacatalog prefix index 2502, in one embodiment. The user 110 initiallysends a character to the test query builder 2610, a lookup action isperformed on the prefix indexes and some numbers of candidates arereturned to the test query builder 2610, that then presents thecandidates to the user 110 in a front end component 1011, in oneembodiment. The user 110 then repeatedly either types another characteror choose a candidate from those presented by the front end component1011 and the partial query maintained by the query builder is sent tothe prefix indexes to generate the next round of candidates, in oneembodiment. Eventually, the user 110 sends a test query signal to thetest query builder 2610, upon which it will issue a test version of thequery to the original database 102 and/or the sample database 104, inone embodiment.

In one embodiment, a method of a query editor 100 includes generating adata profile 116 which includes a set of characteristics 125 captured atvarious granularities of an initial result set 112 generated from aninitial query 106 using a processor 132 and a memory 134. The methoddetermines what a user 110 expects in the initial result set 112 of theinitial query 106 and/or a subsequent result set(s) 114 of a subsequentquery 108 based on the data profile 116 and/or a heuristically estimateddata profile. The method includes enabling the user 110 to evaluate asemantic accuracy of the subsequent query 108 based on the likelyexpectation of the user 110 as determined through the set ofcharacteristics 125 of the data profile 116.

The set of characteristics 125 may include metadata 118 of the initialquery 106. For example, the set of characteristics 125 may include anumber of attributes in the initial result set 112, a data type of eachof the attributes, a frequency of usage per user 110, a uniquenessconstraint on the attributes, a nullability of individual attributes,and/or a functional dependency between attributes. The method maydetermine a match ratio between the subsequent query 108 and the initialquery 106. At least some of the set of characteristics 125 of the dataprofile 116 may be presented to the user 110 based on the match ratiothrough the query editor 100.

The set of characteristics 125 may include individual rowcharacteristics 120. The data profile 116 may include a random sample ofinformation presented in the initial result set 112. The user 110 may beable to perform a cursory examination of the presented ones of the setof characteristics 125 and/or the random sample of information presentedin the initial result set 112 and/or the subsequent result set(s) 114(e.g., based on the match ratio between the subsequent query 108 and theinitial query 106). The set of characteristics 125 may include aggregatestatistical characteristics 122 including generic aggregate statistics124 and scenario aggregate statistics 126. The generic aggregatestatistics 124 may be calculated in a manner that is independent of aset of semantics of the attributes. The generic aggregate statistics 126may be defined through a domain expert. The generic aggregate statistics126 may be relevant in a particular scenario to enable the incorporationof a domain-specific interpretation of semantics of each attribute andeach set of data of the initial result set 112 and/or the subsequentresult set(s) 114.

The generic aggregate statistics 124 may include number of rows of theinitial result set 112 and/or the subsequent result set(s) 114, a countof distinct values in each attribute, a distribution of attribute valuesincluding frequency per attribute value, a pattern of attribute valuesfor attribute values and/or a set of functional dependencies amongattribute value pairs. The generic aggregate value statistics may beapplicable with no customization by the user 110. The generic aggregatestatistics 126 may be programmed via user 110-defined aggregate queriesand may be associated with the initial result set 112 and the subsequentresult set(s) 114.

The syntax of the user 110-defined aggregate queries may be specific toa standard query processing engine and the signature of the genericaggregate statistics 126 may create the signature corresponds to a setof table valued functions. The method may present the set ofcharacteristics 125 of the data profile 116 to the user 110 through thequery editor 100 based on an auto-complete algorithm (e.g., of theauto-complete algorithm module 200) to which the data profile 116 and/orthe initial result set 112 and/or the subsequent result will bepredicted when a partial input of the initial query 106 and/or thesubsequent query 108 is entered in the query editor 100.

The set of characteristics 125 of the data profile 116 may be presentedto the user 110 of the query editor 100 through a profile visualizermodule 204. The module may generate a visual representation of the dataprofile 116 in a searchable format and/or a hierarchical format and/or anavigable format. The method may include computing the data profile 116through a result set profiler module 202 which may map each attributevalue of the attribute to the number of times particular value isobserved in the attribute and may map patterns exhibited by an attributevalue to a count of times pattern is observed in the attribute.

The pattern may be constructed based on a regular expression ofstring-valued attributes. The method may permit the user 110 to providea user 110 defined table value function using a visual interface throughan application programming interface. The application program interfacemay consider a data source and/or a table and/or a table value aggregatequery data as an input to be registered with the result set profiler.The user 110 may be permitted to mark the subsequent query 108 ascompleted after an iterative evaluation of the data profile 116generated from previous queries. The method may generate sample database104 (e.g., a subset of the original database 102) having an identicalschema which includes a potentially biased random sample of all therelations with a reduced set of data. The method may execute thesubsequent query 108 through the use of sample database 104 (e.g., asubset of the original database 102) to enable the user 110 to reducethe time in debugging the subsequent query 108.

The method may apply a reservoir sampling algorithm 210 to ensure aconstant sample size is maintained. Each row in the subsequent resultset(s) 114 of any subsequent query 108 is selected with a sameprobability in a manner such that a tuple selected by many subsequentqueries in a query log is likely to be selected in the potentiallybiased random sample with a higher probability. The method may generatean aggregate value based on the potentially biased random sample througha heuristical-estimation algorithm 212. The method may monitor thebehavior of the user 110 in interacting with the set of characteristics125 of the data profile 116 when the subsequent query 108 is generated.Further, the method may refine an presentation algorithm which mayoptimally determines the characteristics to present the user 110 basedin further query based on a monitored behavior of the user 110interacting with initial query 106 and/or the subsequent query 108 inthe query editor 100.

In another embodiment, a query editor 100 application includes a resultset profiler module 202 to generate a data profile 116 which includes aset of characteristics 125 captured at various granularities of aninitial result set 112 generated from an initial query 106 using aprocessor 132 and a memory 134. The query editor 100 application alsoincludes a heuristical-estimation module (e.g., the estimation module216) to determine what a user 110 expects the initial result set 112 ofthe initial query 106 and/or in a subsequent result set(s) 114 of asubsequent query 108 based on the data profile 116 and/or aheuristically estimated data profile. Furthermore, the query editor 100application includes a profile visualizer module 204 to enable the user110 to evaluate a semantic accuracy of the subsequent query 108 based onthe likely expectation of the user 110 as determined through the set ofcharacteristics 125 of the data profile 116.

In yet another embodiment, a non-transitory medium, readable through aprocessor 132 and a memory 134, which includes instructions embodiedthat are executable through the processor 132 and the memory 134includes the instructions to determine what a user 110 expects in one ofan initial result set 112 of an initial query 106 and/or a subsequentresult set(s) 114 of a subsequent query 108 based on a data profile 116and/or a heuristically estimated data profile. The non-transitory mediumincludes the instructions to enable the user 110 to evaluate a semanticaccuracy of the subsequent query 108 based on the likely expectation ofthe user 110 as determined through a set of characteristics 125 of thedata profile 116. The method further includes instructions to presentsome set of characteristics 125 of the data profile 116 to the user 110based on the match ratio through the query editor 100.

In one embodiment, a method of a curated answers system 850 includesautomatically populating a profile markup page 806 of a user withinformation 804 describing an initial query 802 of a database 803 thatthe user 110 has generated using a processor 132 and a memory 134,determining that another user 810 of the database 803 has submitted asimilar query 808 that is semantically proximate to the initial query802 of the database 803 that the user 110 has generated, and presentingthe profile markup page 806 of the user 110 to the other user 810. Themethod of the curated answers system 850 may include enabling the otheruser 810 to communicate with the user 110 through a communicationchannel on the profile markup page 806.

A question 900 of the other user 810 may be published to the user 110 onthe profile markup page 806 of the user, and/or other profile markuppage 812 of the other user 810. The question 900 may be associated asbeing posted by the other user 810. The method of the curated answerssystem 850 may include processing a response 902 of the user 110 to thequestion 900. The response 902 of the user 110 to the question 900 maybe published on the profile markup page 806 of the user 110 and/or theother profile markup page 812 of the other user 810. The response 902may be associated as being posted by the user.

A table indicating a set of profiles 1014 may be automatically generatedand associated with different users 1010 that have queried the database803 with a semantically proximate query to the similar query 808 basedon overall the user's and another user's usage of the data objects inthe query log. The table may be presented to the other user 810. Thesystem may enable the other user 810 to communicate with any of thedifferent users 1010 associated with the set of profiles 1014. A usergroup(s) 908 (e.g., that includes the other user 810 and/or the user)may be generated based on a relevancy between the similar query 808 andthe initial query 802. Users of the database 803 may be permitted toassociate an electronic mailing address 910, a phone number 912, abiography 914, a personal photograph 906, a social media handle 916,and/or an educational background 918 with their profile.

The profile markup page 806 of the other user 810 may be automaticallypopulated with information 804 describing the similar query 808 of thedatabase 803 that the other user 810 has generated. The profile markuppage 806 of the user 110 may be automatically populated with information804 describing the initial query 802 of the database 803 that the user110 has generated. The other profile markup page 812 of the other user810 may be automatically populated with information 804 describing thesimilar query 808 of the database 803. Both these operations (e.g.,populating profile markup pages) may be performed through automaticobservation and/or monitoring of activity of the user 110 and/or theother user 810 in interacting with the database 803.

A social data catalog table 1016 of information 804 about how users areinteracting with the database 803 and/or a sample database 104 may begenerated. The social data catalog table 1016 may be populated with ameta data, a logical definition and/or description of attributes,information 804 about usage, page views between users, a social datanetwork, and/or a statistical data profile. Information 804 fromexternal data source 1012 s and/or social media profiles may beextracted to generate the social data catalog table 1016 of information804. Information 804 from a ranked list of knowledgeable users may becrowd sourced to generate a ranked order of priority of information 804presented in profile pages of the curated answers system 850.

The information 804 about usage may include related tables and/or joinpredicates as well as relevant filters associated with each table of thedatabase 803 and/or the sample database 104. The social data network mayinclude a list of users who are knowledgeable about a particular objectrelated to the other query. The information 804 may be a metadata suchas a schema name, a table in a schema, a name of an attribute, a datatype of an attribute, a primary key associated with an attribute, aconstraint of an attribute, a functional dependency between attributes,an index, a foreign key, a field name, a column name, a table name,and/or a query description.

A data catalog studio module 1000 that includes a data catalogrepository 1004, a data source 1012 registrar 1006, a backgroundextraction component (e.g., background extraction module 1002), a frontend component 1011, and/or a user interaction logger 1008 may begenerated. The data catalog repository 1004 may store the social datacatalog api1102 (e.g., having the social data catalog table 1016), adata object and/or information 804 about the data object. The datacatalog repository 1004 may return information 804 about the dataobject. The data catalog repository 1004 may also update storedinformation 804 and return a ranked list of relevant data object.Similarly, the data catalog repository 1004 may search and return a listof data object of a given type. The data source 1012 register mayregister and extract from the data source 1012 declared metadata from aschema.

The front end component 1011 may enable the user 110 and/or the otheruser 810 to register a data source 1012, upload documentation on thedata source 1012, upload the query log, search relevant objects, and/orbrowse the schema in the data source 1012. The background extractioncomponent (e.g., background extraction module 1002) may automaticallyprofile, locate, extract, and/or associate a documentation of the user110 and/or the other user 810 in the data source 1012. The backgroundextraction component (e.g., background extraction module 1002) may alsoautomatically profile, locate, extract, and/or associate a query log ofthe user 110 and/or the other user 810 in the data source 1012. Thesystem may monitor and/or log interactions between the front endcomponent 1011 and/or various users accessing the front end component1010 that add, delete, reorder, modify, and/or sort information 804presented in profile pages of users of the curated answers system 850.In addition, the system may auto-generating queries about individualdata objects comprising a schema, a table, an attribute, and anattribute value to enable users to automatically communicate with expertusers on at least one of these individual data objects and enablingcommunication with the expert users through a single click methodologyin each data page of the data catalog repository. Further, the systemmay auto-generating a question for a user to post based on observedcontent comprising at least one of a current details of a page, a titleof a page, a description of a page, and a further clarificationrequested by the user prior to a question posting.

In other embodiment, a method of a curated answers system 850 includesautomatically populating a profile markup page 806 of a user withinformation 804 describing an initial query 802 of a database 803 thatthe user 110 has generated using a processor 132 and a memory 134,determining that another user 810 of the database 803 has submitted asimilar query 808 that is semantically proximate to the initial query802 of the database 803 that the user 110 has generated, presenting theprofile markup page 806 of the user 110 to the other user 810, enablingthe other user 810 to communicate with the user 110 through acommunication channel on the profile markup page 806, publishing aquestion 900 of the other user 810 to the user 110 on the profile markuppage 806 of the user 110 and/or other profile markup page 812 of theother user 810, associating the question 900 as being posted by theother user 810, processing a response 902 of the user 110 to thequestion 900, publishing the response 902 of the user 110 to thequestion 900 on the profile markup page 806 of the user 110 and/or theother profile markup page 812 of the other user 810, and associating theresponse 902 as being posted by the user.

In yet other embodiment, a curated answers system 850 includes a datacatalog module to automatically populate a profile markup page 806 of auser with information 804 describing an initial query 802 of a database803 that the user 110 has generated using a processor 132 and a memory134, a social catalog module to determine that another user 810 of thedatabase 803 has submitted a similar query 808 that is semanticallyproximate to the initial query 802 of the database 803 that the user 110has generated, and a front end component 1010 to present the profilemarkup page 806 of the user 110 to the other user 810.

In one embodiment, a method includes automatically generating aneditable markup page 2200 and/or a page name 2202 based on an initialquery 802 of a database 803 using a processor 132 and a memory 134,associating the generated markup page with a user of the database 803,and appending information to the editable markup page 2200 based on asimilar query 808 of the database 803 by another user 810. The methodmay include permitting other user 810 s of the database 803 to access,modify, append, and/or delete entries from the editable markup page2200.

Each edit may be tracked by the other user 810 s in a log file. The logfile may be presented on the markup page such that visitors to theeditable markup page 2200 have visible to them a change history of theeditable markup page 2200 by various users of the database 803.

A set of rules may be created in which any user can flag an edit made byany user of the database 803 as being marked for deletion. other user810 s may be permitted to vote on whether the edit made should bedeleted. The editable markup page 2200 may be restored to a state priorto the edit being made based on a successful vote of the other user 810s of the database 803.

A profile markup page of the user may be automatically populated withinformation describing the initial query 802 of a database 803 that theuser has generated. It may be determined that other user 810 of thedatabase 803 has submitted a similar query 808 that is semanticallyproximate to the initial query 802 of the database 803 that the user hasgenerated. The profile markup page of the user may be presented to theother user 810. Information may be automatically appended about thesimilar query 808 that is semantically proximate to the initial query802 of the database 803 on the editable markup page 2200.

The other user 810 may be enabled to communicate with the user through acommunication channel on the profile markup page. A question of theother user 810 to the user may be published on the profile markup pageof the user and/or other profile markup page of the other user 810. Thequestion may be associated as being posted by the other user 810. Aresponse of the user to the question may be processed and published onthe profile markup page of the user, the other profile markup page ofthe other user 810 and/or on the editable markup page 2200. The responsemay be associated as being posted by the user.

Users of the database 803 may be permitted to associate an electronicmailing address, a phone number, a biography, a personal photograph, asocial media handle, and/or an educational background with their profileassociated the editable markup page 2200. The other profile markup pageof the other user 810 may be automatically populated with informationdescribing the similar query 808 of the database 803 that the other user810 has generated. The automatic population of the profile markup pageand/or the editable mark up page may be performed through automaticobservation and/or monitoring of activity of the user and/or the otheruser 810 in interacting with the database 803. A social data catalogtable may be generated that populates the editable markup page 2200.

Relationships between different data objects including popular tables,popular attributes, co-queried attributes in a table, related tables,joinable columns, joinable predicates, and/or relevant filter for eachtable using the social data catalog table may be associated.Relationships between data objects and/or users includes a list ofknowledgeable people who may be contacted about particular objects usingthe social data catalog table may also be associated. Queries may beparsed into constituent fragments. Results of parsed queries may beaggregated, normalized and/or stored. Information may be mined using theresults of the parsed queries to populate the social data catalog.

The social data catalog associated with the editable markup page 2200may be populated with information from crawled query logs, analyzedapplication logs, and/or a query editing tool. The crawling query logsmay ingest queries from files where users store queries. Applicationlogs may be analyzed for queries. Query editing tools may be added tothe social data catalog to develop and/or append developed queries tothe editable markup page 2200. A social data catalog module mayimplement a materialized computation and/or an on-demand/or computationas an alternative to an Application Programming Interface (API)function. The materialized computation may involve periodically miningquery logs to update a query reference table with new queries that havenot been previously processed as well as materializing and/or indexingderived information of different data objects.

On-demand computation may involve indexing the query reference tableusing various objects that each row references. The social data catalogtable may be populated with a meta data, a logical definition and/ordescription of attributes, information about usage, page views betweenusers, a social data network, and/or a statistical data profile.Information may be extracted from external data sources and/or socialmedia profiles to generate the social data catalog table of information.Information may be crowdsourced from a ranked list of knowledgeableusers to generate a ranked order of priority of information presented inprofile pages of the curated answers system.

The information about usage may include related tables and/or joinpredicates as well as relevant filters associated with each table of theoriginal database 102 and/or the sample database 104. The social datanetwork may include a list of users who are knowledgeable about aparticular object related to the other query. The information may be ametadata that includes a schema name, a table in a schema, a name of anattribute, a data type of an attribute, a primary key associated with anattribute, a constraint of an attribute, a functional dependency betweenattributes, an index, a foreign key, a field name, a column name, atable name, and/or a query description.

A data catalog studio may be associated with the editable markup page2200. A data catalog repository, a data source registrar, a backgroundextraction component, a frontend component, and/or a user interactionlogger may be generated in the data catalog studio. The data catalogrepository may store the social data catalog, may store a data objectand/or information about the data object, and may return informationabout the data object. The data catalog repository may also updatestored information and return a ranked list of relevant data object. Inaddition, the data catalog repository may search and return a list ofdata object of a given type. A data source may be registered.

The data source may extract declared metadata from a schema using thedata source registrar. The user and/or the other user 810 may be enabledto register a data source, upload documentation on the data source,upload the query log, search relevant objects, and/or browse the schemain the data source using the front end component. A documentation and/ora query log of the user and/or the other user 810 may be automaticallyprofiled, located, extracted and/or associated in the data source usingthe background extraction component. Interactions between the front endcomponent and/or various users accessing the front end component may bemonitored or logged to add, delete, reorder, modify, and/or sortinformation presented in profile pages of users of a curated answerssystem.

In other embodiment, a method includes automatically generating aneditable markup page 2200 and/or a page name 2202 based on an initialquery 802 of a database 803 using a processor 132 and a memory 134,associating the generated markup page with a user of the database 803,appending information to the editable markup page 2200 based on asimilar query 808 of the database 803 by another user 810, permittingother user 810 s of the database 803 to access, modify, append, ordelete the editable markup page 2200.

In yet other embodiment, a collaborative database knowledge repository(e.g., the collaborative database management system 2250) includes asocial database catalog module having a social data catalog table topopulate an editable markup page 2200 of the collaborative databaseknowledge repository (e.g., the collaborative database management system2250). The social data catalog table associates relationships betweendifferent data objects includes popular tables, popular attributes,co-queried attributes in a table, related tables, joinable columns,joinable predicates, and/or relevant filter for each table using thesocial data catalog table.

The collaborative database knowledge repository (e.g., the collaborativedatabase management system 2250) also includes a data catalog studio toassociate with the editable markup page 2200 and to generate in the datacatalog studio a data catalog repository, a data source registrar, abackground extraction component, a frontend component, and/or a userinteraction logger.

Although the present embodiments have been described with reference tospecific example embodiments, it will be evident that variousmodifications and changes may be made to these embodiments withoutdeparting from the broader spirit and scope of the various embodiments.For example, the various devices and modules described herein may beenabled and operated using hardware circuitry (e.g., CMOS based logiccircuitry), firmware, software and/or any combination of hardware,firmware, and software (e.g., embodied in a non-transitorymachine-readable medium). For example, the various electrical structureand methods may be embodied using transistors, logic gates, andelectrical circuits (e.g., application specific integrated (ASIC)circuitry and/or Digital Signal Processor (DSP) circuitry).

In addition, it will be appreciated that the various operations,processes and methods disclosed herein may be embodied in anon-transitory machine-readable medium and/or a machine-accessiblemedium compatible with a data processing system (e.g., data processingsystem 130). Accordingly, the specification and drawings are to beregarded in an illustrative rather than a restrictive sense.

A number of embodiments have been described. Nevertheless, it will beunderstood that various modifications may be made without departing fromthe spirit and scope of the claimed invention. In addition, the logicflows depicted in the figures do not require the particular order shown,and/or sequential order, to achieve desirable results. In addition,other steps may be provided, and/or steps may be eliminated, from thedescribed flows, and other components may be added to, and/or removedfrom, the described systems. Accordingly, other embodiments are withinthe scope of the following claims.

It may be appreciated that the various systems, methods, and apparatusdisclosed herein may be embodied in a machine-readable medium and/or amachine accessible medium compatible with a data processing system(e.g., a computer system), and/or may be performed in any order.

The structures and modules in the figures may be shown as distinct andcommunicating with only a few specific structures and not others. Thestructures may be merged with each other, may perform overlappingfunctions, and may communicate with other structures not shown to beconnected in the figures. Accordingly, the specification and/or drawingsmay be regarded in an illustrative rather than a restrictive sense.

What is claimed is:
 1. A method of a query editor comprising: generatinga data profile comprising a set of characteristics captured at variousgranularities of an initial result set generated from an initial queryusing a processor and a memory; determining what a user expects in atleast one of the initial result set of the initial query and thesubsequent result set of a subsequent query based on one of the dataprofile and a heuristically estimated data profile; and enabling theuser to evaluate a semantic accuracy of the subsequent query based onthe likely expectation of the user as determined through the set ofcharacteristics of the data profile.
 2. The method of claim 1: whereinthe set of characteristics include metadata of the initial querycomprising at least one of: a number of attributes in the initial resultset, a data type of each of the attributes, a frequency of usage peruser, a uniqueness constraint on the attributes, a nullability ofindividual attributes, and a functional dependency between attributes.3. The method of claim 1 further comprising: determining a match ratiobetween the subsequent query and the initial query; and presenting atleast some of the set of characteristics of the data profile to the userbased on the match ratio through the query editor.
 4. The method ofclaim 3: wherein the set of characteristics include individual rowcharacteristics, and wherein the data profile includes a random sampleof information presented in the initial result set, to enable the userto perform a cursory examination of at least one of the presented onesof the at least some of the set of characteristics and the random sampleof information presented in at least one of the initial result set andthe subsequent result set based on the match ratio between thesubsequent query and the initial query.
 5. The method of claim 4:wherein the set of characteristics include aggregate statisticalcharacteristics comprising at least one of generic aggregate statisticsand scenario aggregate statistics, wherein the generic aggregatestatistics are calculated in a manner that is independent of a set ofsemantics of the attributes, and wherein the scenario aggregatestatistics are defined through a domain expert and are relevant in aparticular scenario to enable the incorporation of a domain-specificinterpretation of semantics of each attribute and each set of data of atleast one of the initial result set and the subsequent result set. 6.The method of claim 5: wherein the generic aggregate statistics include:a number of rows in at least one of the initial result set and thesubsequent result set, a count of distinct values in each attribute, adistribution of attribute values including frequency per attributevalue, a pattern of attribute values for attribute values, and a set offunctional dependencies among attribute value pairs, and wherein thegeneric aggregate value statistics are applicable with no customizationby the user.
 7. The method of claim 6: wherein the scenario aggregatestatistics are programmed via user-defined aggregate queries areassociated with at least one of the initial result set and thesubsequent result set, wherein a syntax of the user-defined aggregatequeries are specific to a standard query processing engine, and whereina signature of the scenario aggregate statistics create the signaturethat correspond to a set of table valued functions.
 8. The method of thequery editor of claim 1 further comprising: presenting the set ofcharacteristics of the data profile to the user through the query editorbased on an auto-complete algorithm in which at least one of the dataprofile, initial result set and the subsequent result set is predictedwhen a partial input of at least one of the initial query and thesubsequent query in entered in the query editor.
 9. The method of claim1 wherein the set of characteristics of the data profile is presented tothe user of the query editor through a profile visualizer module whichgenerates a visual representation of the data profile in at least one ofa searchable format, a hierarchical format, and a navigable format. 10.The method of claim 1 further comprising computing the data profilethrough a result set profiler module through which: a first set of hashtables to map each attribute value of an attribute to a number of timesa particular value is observed in the attribute, a second set of hashtables to map patterns exhibited by an attribute value to a count oftimes a pattern is observed in the attribute, and wherein a pattern isconstructed based a regular expression of string-valued attributes. 11.The method of claim 10 further comprising: permitting the user toprovide a user defined table value function using a visual interfacethrough an application programming interface, wherein the applicationprogramming interface to consider at least one of a data source, atable, and a table value aggregate query data as an input to beregistered with the result set profiler; and permitting the user to markthe subsequent query as completed after an iterative evaluation of thedata profile generated from previous queries.
 12. The method of claim 1further comprising: generating a sample database having an identicalschema as that of an original database using a database sampler module,wherein the sample database comprises a potentially biased random sampleof all relations with a reduced set of data; executing the subsequentquery efficiently through the use of the sample database to enable theuser to reduce a time in debugging the subsequent query; and computingthe estimated data profile from the sample database.
 13. The method ofclaim 12 further comprising applying a reservoir sampling algorithm toensure that a constant sample size is maintained and such that each rowin the subsequent result set of any subsequent query is selected with asame probability in a manner such that a tuple that is selected by manysubsequent queries in a query log is likely to be selected in thepotentially biased random sample with a higher probability.
 14. Themethod of claim 13 further comprising: generating an estimate of anaggregate value based on the potentially biased random sample through aheuristical-estimation algorithm.
 15. The method of claim 14 furthercomprising: monitoring a behavior of the user in interacting with theset of characteristics of the data profile when the subsequent query isgenerated; and refining an presentation algorithm that optimallydetermines which characteristics to present to the user based in afurther query based on a monitored behavior of the user in interactingwith at least one of the initial query and the subsequent query in thequery editor.
 16. A query editor application comprising: a result setprofiler module to generate a data profile comprising a set ofcharacteristics captured at various granularities of an initial resultset generated from an initial query using a processor and a memory; aheuristical-estimation module to determine what a user expects in atleast one of the initial result set of the initial query and in asubsequent result set of a subsequent query based on at least one of thedata profile and a heuristically estimated data profile; and a profilevisualizer module to enable the user to evaluate a semantic accuracy ofthe subsequent query based on the likely expectation of the user asdetermined through the set of characteristics of the data profile. 17.The query editor application of claim 16: wherein the set ofcharacteristics include metadata of the initial query comprising atleast one of: a number of attributes in the initial result set, a datatype of each of the attributes, a frequency of usage per user, auniqueness constraint on the attributes, a nullability of individualattributes, and a functional dependency between attributes.
 18. Thequery editor application of claim 16: wherein a match ratio between thesubsequent query and the initial query is determined, and wherein atleast some of the set of characteristics of the data profile arepresented to the user based on the match ratio through the query editor.19. The query editor application of claim 18: wherein the set ofcharacteristics include individual row characteristics, and wherein thedata profile includes a random sample of information presented in atleast one of the initial result set and the subsequent result set, toenable the user to perform a cursory examination of at least one of thepresented ones of the at least some of the set of characteristics andthe random sample of information presented in the initial result setbased on the match ratio between the subsequent query and the initialquery.
 20. The query editor application of claim 19: wherein the set ofcharacteristics include aggregate statistical characteristics comprisingat least one of generic aggregate statistics and scenario aggregatestatistics, wherein the generic aggregate statistics are calculated in amanner that is independent of a set of semantics of the attributes, andwherein the scenario aggregate statistics are defined through a domainexpert and are relevant in a particular scenario to enable theincorporation of a domain-specific interpretation of semantics of eachattribute and each set of data of at least one of the initial result setand the subsequent result set.
 21. The query editor application of claim20: wherein the generic aggregate statistics include: a number of rowsin at least one of the initial result set and the subsequent result set,a count of distinct values in each attribute, a distribution ofattribute values including frequency per attribute value, a pattern ofattribute values for attribute values, and a set of functionaldependencies among attribute value pairs, and wherein the genericaggregate value statistics are applicable with no customization by theuser.
 22. The query editor application of claim 21: wherein the scenarioaggregate statistics are programmed via user-defined aggregate queriesare associated with at least one of the initial result set and thesubsequent result set, wherein a syntax of the user-defined aggregatequeries are specific to a standard query processing engine, and whereina signature of the scenario aggregate statistics create the signaturethat correspond to a set of table valued functions.
 23. The query editorapplication of claim 16 further comprising: the set of characteristicsof the data profile are presented to the user through the query editorbased on an auto-complete algorithm in which at least one of the dataprofile, initial result set and the subsequent result set is predictedwhen a partial input of at least one of the initial query and thesubsequent query in entered in the query editor.
 24. The query editorapplication of claim 16 wherein the set of characteristics of the dataprofile is presented to the user of the query editor through a profilevisualizer module which generates a visual representation of the dataprofile in at least one of a searchable format, a hierarchical format,and a navigable format.
 25. The query editor application of claim 16wherein the data profile is computed through a result set profilermodule through which: a first set of hash tables to map each attributevalue of an attribute to a number of times a particular value isobserved in the attribute, a second set of hash tables to map patternsexhibited by an attribute value to a count of times a pattern isobserved in the attribute, and wherein a pattern is constructed based aregular expression of string-valued attributes.
 26. The query editorapplication of claim 25: wherein the user to provide a user definedtable value function using a visual interface through an applicationprogramming interface, wherein the application programming interface toconsider at least one of a data source, a table, and a table valueaggregate query data as an input to be registered with the result setprofiler, and wherein the user is permitted to mark the subsequent queryas completed after an iterative evaluation of the data profile generatedfrom previous queries.
 27. The query editor application of claim 26further comprising: wherein a sample database is generated having anidentical schema as that of an original database using a databasesampler module, wherein the sample database comprises a potentiallybiased random sample of all relations with a reduced set of data, andwherein the subsequent query is executed efficiently through the use ofthe sample database to enable the user to reduce a time in debugging thesubsequent query.
 28. The query editor application of claim 27 wherein areservoir sampling algorithm is applied to ensure that a constant samplesize is maintained and such that each row in the subsequent result setof any subsequent query is selected with a same probability in a mannersuch that a tuple that is selected by many subsequent queries in a querylog is likely to be selected in the potentially biased random samplewith a higher probability.
 29. The method claim 28 wherein an estimateof an aggregate value is generated based on the potentially biasedrandom sample through a heuristical-estimation algorithm.
 30. The methodof claim 29: wherein a behavior of the user in interacting with the setof characteristics of the data profile is monitored when the subsequentquery is generated, and wherein a presentation algorithm that optimallydetermines which characteristics to present to the user is refined basedin a further query based on a monitored behavior of the user ininteracting with at least one of the initial query and the subsequentquery in the query editor.
 31. A non-transitory medium, readable througha processor and a memory, that comprises instructions embodied thereinthat are executable through the processor and the memory, comprising:instructions to determine what a user expects in at least one of aninitial result set of an initial query and a subsequent result set of asubsequent query based on at least one of a data profile and aheuristically estimated data profile; and instructions to enable theuser to evaluate a semantic accuracy of the subsequent query based onthe likely expectation of the user as determined through a set ofcharacteristics of the data profile; and instructions to present atleast some of the set of characteristics of the data profile to the userbased on the match ratio through the query editor.
 32. Thenon-transitory medium of claim 31: instructions to generate the dataprofile comprising the set of characteristics captured at variousgranularities of the initial result set generated from the initialquery; wherein the set of characteristics include metadata of theinitial query comprising at least one of: a number of attributes in theinitial result set, a data type of each of the attributes, a uniquenessconstraint on the attributes, a frequency of usage per user, anullability of individual attributes, and a functional dependencybetween attributes.
 33. The non-transitory medium of claim 31 furthercomprising: instructions to determine a match ratio between thesubsequent query and an initial query.
 34. The non-transitory medium ofclaim 33: wherein the set of characteristics include individual rowcharacteristics, and wherein the data profile includes a random sampleof information presented in at least one of the initial result set andthe subsequent result set, to enable the user to perform a cursoryexamination of at least one of the presented ones of the at least someof the set of characteristics and the random sample of informationpresented in the initial result set based on the match ratio between thesubsequent query and the initial query.
 35. The non-transitory medium ofclaim 34: wherein the set of characteristics include aggregatestatistical characteristics comprising at least one of generic aggregatestatistics and scenario aggregate statistics, wherein the genericaggregate statistics are calculated in a manner that is independent of aset of semantics of the attributes, and wherein the scenario aggregatestatistics are defined through a domain expert and are relevant in aparticular scenario to enable the incorporation of a domain-specificinterpretation of semantics of each attribute and each set of data of atleast one of the initial result set and the subsequent result set. 36.The non-transitory medium of claim 35: wherein the generic aggregatestatistics include: a number of rows in at least one of the initialresult set and the subsequent result set, a count of distinct values ineach attribute, a distribution of attribute values including frequencyper attribute value, a pattern of attribute values for attribute values,and a set of functional dependencies among attribute value pairs, andwherein the generic aggregate value statistics are applicable with nocustomization by the user.
 37. The non-transitory medium of claim 36:wherein the scenario aggregate statistics are programmed viauser-defined aggregate queries are associated with at least one of theinitial result set and the subsequent result set, wherein a syntax ofthe user-defined aggregate queries are specific to a standard queryprocessing engine, and wherein a signature of the scenario aggregatestatistics create the signature that correspond to a set of table valuedfunctions.
 38. The non-transitory medium of the query editor of claim 31further comprising: instructions to present the set of characteristicsof the data profile to the user through the query editor based on anauto-complete algorithm in which at least one of the data profile,initial result set and the subsequent result set is predicted when apartial input of at least one of the initial query and the subsequentquery in entered in the query editor.
 39. The non-transitory medium ofclaim 31 wherein the set of characteristics of the data profile ispresented to the user of the query editor through a profile visualizermodule which generates a visual representation of the data profile in atleast one of a searchable format, a hierarchical format, and a navigableformat.
 40. The non-transitory medium of claim 31 further comprisinginstructions to compute the data profile through a result set profilermodule through which: a first set of hash tables to map each attributevalue of an attribute to a number of times a particular value isobserved in the attribute, a second set of hash tables to map patternsexhibited by an attribute value to a count of times a pattern isobserved in the attribute, and wherein a pattern is constructed based ona regular expression of string-valued attributes.
 41. The non-transitorymedium of claim 40 further comprising: instructions to permit the userto provide a user defined table value function using a visual interfacethrough an application programming interface, wherein the applicationprogramming interface to consider at least one of a data source, atable, and a table value aggregate query data as an input to beregistered with the result set profiler; and instructions to permit theuser to mark the subsequent query as completed after an iterativeevaluation of the data profile generated from previous queries.
 42. Thenon-transitory medium of claim 31 further comprising: instructions togenerate a sample database having an identical schema as that of anoriginal database using a database sampler module, wherein the sampledatabase comprises a potentially biased random sample of all relationswith a reduced set of data; and instructions to execute the subsequentquery efficiently through the use of the sample database to enable theuser to reduce a time in debugging the subsequent query.
 43. Thenon-transitory medium of claim 42 further comprising instructions toapply a reservoir sampling algorithm to ensure that a constant samplesize is maintained and such that each row in the subsequent result setof any subsequent query is selected with a same probability in a mannersuch that a tuple that is selected by many subsequent queries in a querylog is likely to be selected in the potentially biased random samplewith a higher probability.
 44. The non-transitory medium of claim 43further comprising: instructions to generate an estimate of an aggregatevalue based on the potentially biased random sample through aheuristical-estimation algorithm.
 45. The non-transitory medium of claim44 further comprising: instructions to monitor a behavior of the user ininteracting with the set of characteristics of the data profile when thesubsequent query is generated; and instructions to refine anpresentation algorithm that optimally determines which characteristicsto present to the user based in a further query based on a monitoredbehavior of the user in interacting with at least one of the initialquery and the subsequent query in the query editor.